


#if !defined( __POINTS_H__ )
#define __POINTS_H__


#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "points.h"
#endif

#include <wx/wxprec.h>

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
    #include <wx/dynarray.h>
#endif

#include "wx/charttypes.h"




struct Point
{
    wxString m_name;
    ChartValue m_xval;
    ChartValue m_yval;
    ChartColor m_col;
    Point(wxString name=wxEmptyString, ChartValue x=0, ChartValue y=0,
            ChartColor c = 0);
};


WX_DECLARE_OBJARRAY(Point, ListPoints);



class WXDLLIMPEXP_CHART wxPoints

{
public:
	wxPoints();
	~wxPoints();



	void Add(const Point &p);
    void Add(const wxString s, const ChartValue x, const ChartValue y,
			 const ChartColor c = 0);



	void Clear();



	Point GetPoint(size_t n) const;
    wxString GetName(size_t n) const;
	ChartValue GetXVal(size_t n) const;
	ChartValue GetYVal(size_t n) const;
	ChartColor GetColor(size_t n) const;



	size_t GetCount() const;
	ChartValue GetMaxX() const;
	ChartValue GetMaxY() const;
	ChartValue GetMinX() const;
	ChartValue GetMinY() const;





private:

	ListPoints m_vPoints;



	size_t GetInsertPosition(const Point& p);




	wxPoints(const wxPoints&);
	wxPoints& operator=(const wxPoints&);
};


#endif // __POINTS_H__
